export const JITA_REGION_ID = 10000002;

export const CACHE_DIR = "../";

export const PLANT_TEXT: Record<string, string> = {
  barren: "行星（贫瘠）",
  lava: "行星（熔岩）",
  plasma: "行星（等离子）",
  temperate: "行星（温和）",
  gas: "行星（气体）",
  oceanic: "行星（海洋）",
  ice: "行星（冰体）",
  storm: "行星（风暴）",
};

/**
 * 将各种材料与它们可以找到的行星类型相关联的地图。
 */
export const MATERIAL_TO_PLANETS_MAP = {
  贵金属: ["barren"],
  基础金属: ["barren", "lava", "storm", "plasma", "gas"],
  碳化合物: ["barren", "temperate", "oceanic", "ice"],
  微生物: ["barren", "temperate", "ice", "oceanic"],
  水基液体: ["barren", "storm", "gas", "temperate", "ice", "oceanic"],
  重金属: ["lava", "ice", "plasma"],
  长英矿物岩浆: ["lava"],
  非立方晶体: ["lava", "plasma"],
  悬浮等离子: ["lava", "plasma", "storm"],
  自养生物: ["temperate"],
  复杂有机生命体: ["temperate", "oceanic"],
  浮游生物群: ["oceanic", "ice"],
  离子溶液: ["gas", "storm"],
  活性气体: ["gas"],
  稀有气体: ["gas", "ice", "storm"],
};

export const PLANET_MATERIAL: Record<string, string[]> = {};
Object.entries(MATERIAL_TO_PLANETS_MAP).forEach(([material, planets]) => {
  planets.forEach((planet) => {
    const translatedPlanet = PLANT_TEXT[planet];
    if (translatedPlanet) {
      if (!PLANET_MATERIAL[translatedPlanet]) {
        PLANET_MATERIAL[translatedPlanet] = [];
      }
      PLANET_MATERIAL[translatedPlanet].push(material);
    }
  });
});

/**
 * 行星发射中心组代码
 */
export const PLANT_SEND_PIN_GROUP_ID = 1030;
/**
 * 行星指挥中心组代码
 */
export const PLANT_CENTER_PIN_GROUP_ID = 1027;
/**
 * 行星资源处理工厂组代码
 */
export const PLANT_BASIC_FACTORY_GROUP_ID = 1028;
/**
 * 行星资源采集器组代码
 */
export const PLANT_COLLECTOR_GROUP_ID = 1063;
/**
 *标准循环周期
 */
export const STANDARD_CYCLE_TIME = 1800;
